package com.lg.jvm.gc;

/**
 * 测试jstack 的查看cpu 占用100% 配合top 命令
 *
 * @author Gang.Li
 * @date 2021/6/9 10:28
 */
public class CPUMath {

    //public static final int initData = 666;
    //public static User user = new User();

    public int compute() {  //一个方法对应一块栈帧内存区域
        int a = 1;
        int b = 2;
        int c = (a + b) * 10;
        return c;
    }

    public static void main(String[] args) {
        CPUMath math = new CPUMath();
        while (true) {
            math.compute();
        }
    }
}
